<?php

/**
 * 系统配置演示数据
 */
$data = [
    // 基础设置
    ['group_name' => 'base', 'column_name' => 'name', 'column_comment' => '站点名称', 'column_tip' => '', 'component_name' => 'text',],
    ['group_name' => 'base', 'column_name' => 'logo', 'column_comment' => '网站LOGO', 'column_tip' => '', 'component_name' => 'imguploader',],
    ['group_name' => 'base', 'column_name' => 'status', 'column_comment' => '站点状态', 'column_tip' => '', 'component_name' => 'radio', 'component_data' => '0=关闭&1=开启'],
    ['group_name' => 'base', 'column_name' => 'notice', 'column_comment' => '站点维护公告', 'column_tip' => '', 'component_name' => 'editor', 'default_value' => '抱歉，网站正在维护中...'],
    ['group_name' => 'base', 'column_name' => 'seo_title', 'column_comment' => 'SEO 标题', 'column_tip' => '', 'component_name' => 'text',],
    ['group_name' => 'base', 'column_name' => 'seo_description', 'column_comment' => 'SEO 描述', 'column_tip' => '', 'component_name' => 'textarea',],
    ['group_name' => 'base', 'column_name' => 'license', 'column_comment' => '备案信息', 'column_tip' => 'ICP备案号、公安备案号', 'component_name' => 'textarea'],
    ['group_name' => 'base', 'column_name' => 'footer_script', 'column_comment' => '底部HTML代码', 'column_tip' => '', 'component_name' => 'editor',],
    ['group_name' => 'base', 'column_name' => 'sensitive_words', 'column_comment' => '敏感词库', 'column_tip' => '', 'component_name' => 'textarea',],
    // 后台设置
    ['group_name' => 'dashboard', 'column_name' => 'app_name', 'column_comment' => '应用名称', 'column_tip' => '', 'component_name' => 'text'],
    ['group_name' => 'dashboard', 'column_name' => 'page_size', 'column_comment' => '分页数量', 'column_tip' => '', 'component_name' => 'number', 'default_value' => '10'],
    ['group_name' => 'dashboard', 'column_name' => 'theme', 'column_comment' => '主题样式', 'column_tip' => '', 'component_name' => 'select', 'component_data' => 'dark=暗色&pink=粉色&green=绿色&blue=蓝色'],
    ['group_name' => 'dashboard', 'column_name' => 'login_type', 'column_comment' => '登录方式', 'column_tip' => '账号密码、手机验证码、邮箱', 'component_name' => 'radio', 'component_data' => 'account=账号登录&mobile=手机登录&email=邮箱登录'],
    ['group_name' => 'dashboard', 'column_name' => 'ip_whitelist', 'column_comment' => 'IP 白名单', 'column_tip' => '允许登录的IP', 'component_name' => 'textarea',],
    ['group_name' => 'dashboard', 'column_name' => 'ip_blacklist', 'column_comment' => 'IP 黑名单', 'column_tip' => '禁止登录的IP', 'component_name' => 'textarea'],
    // 商店信息
    ['group_name' => 'shop', 'column_name' => 'name', 'column_comment' => '商店名称', 'column_tip' => '', 'component_name' => 'text',],
    ['group_name' => 'shop', 'column_name' => 'tel', 'column_comment' => '商店电话', 'column_tip' => '', 'component_name' => 'text',],
    ['group_name' => 'shop', 'column_name' => 'email', 'column_comment' => '商店邮箱', 'column_tip' => '', 'component_name' => 'text',],
    ['group_name' => 'shop', 'column_name' => 'address', 'column_comment' => '商店地址', 'column_tip' => '', 'component_name' => 'text',],
    ['group_name' => 'shop', 'column_name' => 'qrcode', 'column_comment' => '商店二维码', 'column_tip' => '', 'component_name' => 'imguploader',],
    ['group_name' => 'shop', 'column_name' => 'intro', 'column_comment' => '商店简介', 'column_tip' => '', 'component_name' => 'textarea',],
    // 分销设置
    ['group_name' => 'promote', 'column_name' => 'ommission_rate_of_platform', 'column_comment' => '平台分成比例', 'component_name' => 'text', 'default_value' => '20'],
    ['group_name' => 'promote', 'column_name' => 'commission_rate_of_promoter1', 'column_comment' => '一级推广员分成比例',  'component_name' => 'text', 'default_value' => '15'],
    ['group_name' => 'promote', 'column_name' => 'commission_rate_of_promoter2', 'column_comment' => '二级推广员分成比例', 'component_name' => 'text', 'default_value' => '5'],
    ['group_name' => 'promote', 'column_name' => 'withdrawal_min_amount', 'column_comment' => '单笔提现最低限额', 'component_name' => 'number', 'default_value' => '10'],
    ['group_name' => 'promote', 'column_name' => 'withdrawal_max_amount', 'column_comment' => '单笔提现最高限额', 'component_name' => 'number', 'default_value' => '1000'],
    ['group_name' => 'promote', 'column_name' => 'withdrawal_times', 'column_comment' => '每天提现次数','component_name' => 'number', 'default_value' => '1'],  
    ['group_name' => 'promote', 'column_name' => 'withdrawal_rule', 'column_comment' => '提现规则','component_name' => 'editor', 'default_value' => ''],    
    // 用户设置
    ['group_name' => 'user', 'column_name' => 'allow_regist', 'column_comment' => '允许用户注册', 'column_tip' => '', 'component_name' => 'radio', 'component_data' => '0=关闭&1=开启'],
    ['group_name' => 'user', 'column_name' => 'regist_need_code', 'column_comment' => '注册需要邀请码', 'column_tip' => '', 'component_name' => 'radio', 'component_data' => '0=否&1=是'],
    ['group_name' => 'user', 'column_name' => 'regist_type', 'column_comment' => '注册方式', 'column_tip' => '账号密码、手机验证码、邮箱', 'component_name' => 'checkbox', 'component_data' => 'account=账号登录&mobile=手机登录&email=邮箱登录'],
    ['group_name' => 'user', 'column_name' => 'allow_login', 'column_comment' => '允许用户登录', 'column_tip' => '', 'component_name' => 'radio', 'component_data' => '0=关闭&1=开启'],
    ['group_name' => 'user', 'column_name' => 'login_type', 'column_comment' => '用户登录方式', 'column_tip' => '账号密码、手机验证码、邮箱', 'component_name' => 'checkbox', 'component_data' => 'account=账号登录&mobile=手机登录&email=邮箱登录'],
    ['group_name' => 'user', 'column_name' => 'default_avatar', 'column_comment' => '默认头像', 'component_name' => 'text', 'default_value' => '/static/images/avatar/1.jpg'],
    ['group_name' => 'user', 'column_name' => 'ip_whitelist', 'column_comment' => 'IP 白名单', 'column_tip' => '', 'component_name' => 'textarea',],
    ['group_name' => 'user', 'column_name' => 'ip_blacklist', 'column_comment' => 'IP 黑名单', 'column_tip' => '', 'component_name' => 'textarea',],
    // 上传配置
    ['group_name' => 'upload', 'column_name' => 'allow_upload', 'column_comment' => '允许上传', 'column_tip' => '', 'component_name' => 'radio', 'component_data' => '0=关闭&1=开启'],
    ['group_name' => 'upload', 'column_name' => 'max_file_size', 'column_comment' => '最大文件尺寸', 'column_tip' => '', 'component_name' => 'number', 'default_value' => '2097152'],
    ['group_name' => 'upload', 'column_name' => 'allow_file_type', 'column_comment' => '允许上传文件类型', 'column_tip' => '', 'component_name' => 'radio', 'component_data' => 'all=不限&img=图片'],
    // 短信设置
    ['group_name' => 'sms', 'column_name' => 'provider', 'column_comment' => '服务商', 'column_tip' => '', 'component_name' => 'radio', 'component_data' => 'juhe=聚合短信'],
    ['group_name' => 'sms', 'column_name' => 'send_url', 'column_comment' => '短信接口URL', 'column_tip' => '', 'component_name' => 'text',],
    ['group_name' => 'sms', 'column_name' => 'appkey', 'column_comment' => '申请的APPKEY', 'column_tip' => '', 'component_name' => 'text',],
    ['group_name' => 'sms', 'column_name' => 'tpl_id', 'column_comment' => '申请的短信模板ID', 'column_tip' => '', 'component_name' => 'text',],
    ['group_name' => 'sms', 'column_name' => 'tpl_value', 'column_comment' => '短信模板内容', 'column_tip' => '', 'component_name' => 'text',],
    // 邮箱设置
    ['group_name' => 'email', 'column_name' => 'transport', 'column_comment' => '传输方式', 'column_tip' => '', 'component_name' => 'radio', 'component_data' => 'smtp=SMTP' ],
    ['group_name' => 'email', 'column_name' => 'host', 'column_comment' => 'SMTP服务器', 'column_tip' => '', 'component_name' => 'text',],
    ['group_name' => 'email', 'column_name' => 'port', 'column_comment' => '服务器端口', 'column_tip' => '服务器端口 25 或者465 具体要看邮箱服务器支持', 'component_name' => 'text',],
    ['group_name' => 'email', 'column_name' => 'user', 'column_comment' => 'SMTP 用户名', 'column_tip' => '即邮箱的用户名', 'component_name' => 'text',],
    ['group_name' => 'email', 'column_name' => 'password', 'column_comment' => 'SMTP 密码', 'column_tip' => '部分邮箱是授权码(例如163邮箱)', 'component_name' => 'text',],
    ['group_name' => 'email', 'column_name' => 'smtp_secure', 'column_comment' => '加密协议', 'column_tip' => '允许 TLS 或者ssl协议', 'component_name' => 'radio', 'component_data' => '0=关闭&tls=TLS&ssl=SSL',],
    ['group_name' => 'email', 'column_name' => 'sendemail_from_address', 'column_comment' => '发件邮箱', 'column_tip' => '发送邮件的邮箱全名', 'component_name' => 'text',],
    ['group_name' => 'email', 'column_name' => 'sendemail_from_name', 'column_comment' => '发件别称', 'column_tip' => '发送邮件显示的名称', 'component_name' => 'text',],
    // 在线客服
    ['group_name' => 'olservice', 'column_name' => 'qqseat01 ', 'column_comment' => 'QQ坐席号码', 'column_tip' => '', 'component_name' => 'text',],
    // 协议管理
    ['group_name' => 'agreement', 'column_name' => 'registration ', 'column_comment' => '用户注册协议', 'column_tip' => '', 'component_name' => 'editor',],
    ['group_name' => 'agreement', 'column_name' => 'privacy', 'column_comment' => '用户隐私协议', 'column_tip' => '', 'component_name' => 'editor',],
];
$data2=[];
foreach ($data as $row) {
    $row['created_at'] = time();
    $row['updated_at'] = time();
    $row['is_locked'] = 1;
    $data2[]=$row;
}
$data=$data2;
unset($data2);
return ['table' => 'esxdm_sys_config',  'text' => '系统配置',  'truncate' => true,    'data' => $data,];
